import random

print("what level")
level = int(input())

life = 4000
e = 20
f = 50

b = 5
trap_cards = ['you can destroy 1 card af yors anemi']
spal_cards = ['you can dro 2 cards']

mode = ["def","atk"]
tipes_cards = ["trap card","spal card","manster"]
nambers = [000,100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500,2600,2700
           ,2800,2900,3000,3100,3200,3300,3400,3500,3600,3700,3800,3900,4000,4100,4200,4300,4400,4500,4600,4700,4800,4900,5000]
levels = [1,2,3,4,5,6,7,8,9,10,11,12]

def card_campyooter_3(b,e,f):
    if b != 0:
        if atk < life:
    
            namber_tipe_card = random.randint(0,2)
            print(tipes_cards[namber_tipe_card])
            
            if namber_tipe_card == 2:
                print(mode[random.randint(0,1)])
                print(nambers[random.randint(e,f)] + 'def')
                print(nambers[random.randint(e,f)] + 'atk')
                print(levels[random.randint(0,11)])
                b = b - 1
                
            if namber_tipe_card == 1:
                print(trap_cards[random.randint(0,0)])
                b = b - 1
               
            if namber_tipe_card == 0:
                print(spal_cards[random.randint(0,0)])
                b = b + 1
                
        if atk  > life:
            print(mode[random.randint(0,0)])
            print(nambers[random.randint(e,f)] + 'def')
            print(nambers[random.randint(e,f)] + 'atk')
            print(levels[random.randint(0,11)])
            b = b - 1
            
    print('')        
    print(life)
            
    return b
        
    
a = ''       
while a != 'no' and level == 3:
    print('how mach life you destroyd')
    c = int(input())
    print('continue')
    a = input()
    life = life - c
    print('what is yor atk')
    atk = int(input())
    b = card_campyooter_3(b,e,f)
    e = e - 2
    f = f - 2
    
    
    

def card_campyooter_2(b):
    if b != 0:
        if atk < life:
        
        
    
            namber_tipe_card = random.randint(0,2)
            print(tipes_cards[namber_tipe_card])
                
            if namber_tipe_card == 2:
                print(mode[random.randint(0,1)])
                print(nambers[random.randint(0,30)] + 'def')
                print(nambers[random.randint(0,30)] + 'atk')
                print(levels[random.randint(0,11)])
                b = b - 1
                    
            if namber_tipe_card == 1:
                print(trap_cards[random.randint(0,0)])
                b = b - 1
                   
            if namber_tipe_card == 0:
                print(spal_cards[random.randint(0,0)])
                b = b + 1
                
        if atk  > life or atk == life:
            print(mode[random.randint(0,0)])
            print(nambers[random.randint(0,30)] + 'def')
            print(nambers[random.randint(0,30)] + 'atk')
            print(levels[random.randint(0,11)])
            b = b - 1
            
    print('')        
    print(life)
            
    return b

while a != 'no' and level == 2:
    print('how mach life you destroyd')
    c = int(input())
    print('continue')
    a = input()
    life = life - c
    print('what is yor atk')
    atk = int(input())
    b = card_campyooter_2(b)
    e = e - 1
    f = f - 1
        
    
def card_campyooter_1(b):
    if b != 0:
        
        
        
    
        namber_tipe_card = random.randint(0,2)
        print(tipes_cards[namber_tipe_card])
                
        if namber_tipe_card == 2:
            print(mode[random.randint(0,1)])
            print(nambers[random.randint(0,30)] + 'def')
            print(nambers[random.randint(0,30)] + 'atk')
            print(levels[random.randint(0,11)])
            b = b - 1
                    
        if namber_tipe_card == 1:
            print(trap_cards[random.randint(0,0)])
            b = b - 1
                   
        if namber_tipe_card == 0:
            print(spal_cards[random.randint(0,0)])
            b = b + 1
                
      
            
    print('')        
    print(life)
            
    return b

while a != 'no' and level == 1:
    print('how mach life you destroyd')
    c = int(input())
    print('continue')
    a = input()
    life = life - c
    print('what is yor atk')
    atk = int(input())
    b = card_campyooter_1(b)
    f = f - 1
    
    
    


    
    
    
        
    
